import request from '@/utils/request';

export function listFdyCount(params){
  return request({
    url: '/leave/apply/listFdyCount',
    method: 'get',
    params
  })
}

export function exportParentKnow(id){
  return request({
    url: '/leave/apply/exportParentKnow/'+id,
    method: 'get'
  });
}

export function listCourse(id) {
  return request({
    url: '/leave/apply/listCourse/'+id,
    method: 'get'
  });
}


export function countFdyUnAudit() {
  return request({
    url: '/leave/apply/countFdyUnAudit',
    method: 'get'
  });
}

export function listFdyAll(params) {
  return request({
    url: '/leave/apply/listFdyAll',
    method: 'get',
    params
  });
}

export function doAudit(data) {
  return request({
    url: '/leave/apply/doAudit',
    method: 'post',
    data
  });
}

export function listFdy(params) {
  return request({
    url: '/leave/apply/listFdy',
    method: 'get',
    params
  });
}

// 查询请假申请列表
export function listLeaveApply(query) {
  return request({
    url: '/leave/apply/list',
    method: 'get',
    params: query
  })
}

// 查询请假申请详细
export function getLeaveApply(id) {
  return request({
    url: '/leave/apply/' + id,
    method: 'get'
  })
}

// 新增请假申请
export function addLeaveApply(data) {
  return request({
    url: '/leave/apply',
    method: 'post',
    data: data
  })
}

// 修改请假申请
export function updateLeaveApply(data) {
  return request({
    url: '/leave/apply',
    method: 'put',
    data: data
  })
}

// 删除请假申请
export function delLeaveApply(id) {
  return request({
    url: '/leave/apply/' + id,
    method: 'delete'
  })
}

// 导出请假申请
export function exportLeaveApply(query) {
  return request({
    url: '/leave/apply/export',
    method: 'get',
    params: query
  })
}